home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0411.ZIP
/
TESTDATA.C
< prev
next >
Wrap
Text File
|
1985-09-19
|
564b
|
35 lines
/*
* Program to write a series of blocks of data with hex codes from 0 to ff.
*/
#include "stdio.h"
main(argc,argv)
int argc;
char *argv[];
{
int c,
i,
outfile;
if (argc < 2)
{
puts("Missing output Filename\n");
exit(1);
}
if ((outfile = open(argv[1],1)) == -1)
{
if ((outfile = creat(argv[1])) == -1)
{
printf("\nCannot open ");
puts(argv[1]);
exit(1);
}
}
for(i=0;i<6;i++)
{
for(c=0;c<256;c++)
{
fputc(c,outfile);
}
}
fclose(outfile);
}